import sqlite3

with sqlite3.connect('test.db') as conn:
    cursor = conn.cursor()
    cursor.execute("CREATE TABLE IF NOT EXISTS students (id INT PRIMARY KEY, name TEXT, age INT)")
    cursor.execute("INSERT INTO students VALUES (1, 'Alice', 20)")
    cursor.execute("INSERT INTO students VALUES (2, 'Bob', 22)")
    conn.commit()

    cursor.execute("SELECT * FROM students")
    result = cursor.fetchall()
    for row in result:
        print(row)